<?php

// +----------------------------------------------------------------------
// | 视图数据表
// +----------------------------------------------------------------------

namespace common\model;

use think\model\RelationModel;

class MotionCaptureDataRelationModel extends RelationModel
{
    //自动验证
    protected $_validate = [
        ['motion_capture_data_id', '', '', self::MUST_VALIDATE, 'require', self::MODEL_INSERT],//必须字段
        ['motion_capture_data_id', '', '', self::EXISTS_VALIDATE, 'integer'],
        ['type', ['camera', 'role'], '', self::EXISTS_VALIDATE, 'in'],
    ];

    //自动完成
    protected $_auto = [
        ['created_by', 'fill_created_by', self::MODEL_INSERT, 'function'],
        ['created', 'time', self::MODEL_INSERT, 'function'],
        ['updated', 'time', self::MODEL_BOTH, 'function'],
        ['updated_by', 'fill_created_by', self::MODEL_BOTH, 'function'],
    ];
}
